package com.dtx.singleton;

/**
 * Effective Java作者推荐的枚举单例(线程安全)
 */
public enum EnumSingle {

    INSTANCE;
    public void test(){
        System.out.println("hi~");
    }
}

class EnumTest{
    public static void main(String[] args) {
        EnumSingle.INSTANCE.test();
    }
}
